<!doctype html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT, Blog, JAVA,Spring,Mysql,Quartz,Python,程序员" />





  <link rel="alternate" href="https://my.oschina.net/giegie/rss" title="Gie的博客" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="Quartz的集群部署方案在架构上是分布式的，没有负责集中管理的节点，而是利用数据库锁的方式来实现集群环境下进行并发控制。BTW，分布式部署时需要保证各个节点的系统时间一致。
Quartz数据库核心表如下：


table
description




QRTZ_CALENDARS
存储Quartz的Calendar信息


QRTZ_CRON_TRIGGERS
存储CronTrigger，包括">
<meta property="og:type" content="article">
<meta property="og:title" content="Quartz依赖数据库表">
<meta property="og:url" content="https://jieblog.github.io/2017/02/21/Quartz依赖数据库表/index.html">
<meta property="og:site_name" content="Gie的博客">
<meta property="og:description" content="Quartz的集群部署方案在架构上是分布式的，没有负责集中管理的节点，而是利用数据库锁的方式来实现集群环境下进行并发控制。BTW，分布式部署时需要保证各个节点的系统时间一致。
Quartz数据库核心表如下：


table
description




QRTZ_CALENDARS
存储Quartz的Calendar信息


QRTZ_CRON_TRIGGERS
存储CronTrigger，包括">
<meta property="og:updated_time" content="2017-02-23T06:08:22.692Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Quartz依赖数据库表">
<meta name="twitter:description" content="Quartz的集群部署方案在架构上是分布式的，没有负责集中管理的节点，而是利用数据库锁的方式来实现集群环境下进行并发控制。BTW，分布式部署时需要保证各个节点的系统时间一致。
Quartz数据库核心表如下：


table
description




QRTZ_CALENDARS
存储Quartz的Calendar信息


QRTZ_CRON_TRIGGERS
存储CronTrigger，包括">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '75HUY04HZY',
      apiKey: 'c215d1b4c97f100bad332f84e968d70a',
      indexName: 'qq154987607',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://jieblog.github.io/2017/02/21/Quartz依赖数据库表/"/>





  <meta name="baidu-site-verification" content="cKXv4cbRZc" />
  <meta name="google-site-verification" content="05Vxc1yd7lC2F1bxwmmbQkfP-rZgvPLTqufHSzImPcM" />
  <title> Quartz依赖数据库表 | Gie的博客 </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  





  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?7e8381cb6c39db6048492ff2e52234cb";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Gie的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <h1 class="site-subtitle" itemprop="description">为人瓜而不皮 一身正气</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  
  <div class="algolia-popup popup">
    <div class="algolia-search">
      <div class="algolia-search-input-icon">
        <i class="fa fa-search"></i>
      </div>
      <div class="algolia-search-input" id="algolia-search-input"></div>
    </div>

    <div class="algolia-results">
      <div id="algolia-stats"></div>
      <div id="algolia-hits"></div>
      <div id="algolia-pagination" class="algolia-pagination"></div>
    </div>

    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
  </div>




    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="https://jieblog.github.io/2017/02/21/Quartz依赖数据库表/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Gie">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/logo.png">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="Gie的博客">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="Gie的博客" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">
            
            
              
                Quartz依赖数据库表
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-02-21T00:00:00+08:00">
                2017-02-21
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/JAVAEE/" itemprop="url" rel="index">
                    <span itemprop="name">JAVAEE</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Quartz的集群部署方案在架构上是分布式的，<strong>没有负责集中管理的节点，而是利用数据库锁的方式来实现集群环境下进行并发控制</strong>。BTW，分布式部署时需要保证各个节点的系统时间一致。</p>
<h3 id="Quartz数据库核心表如下："><a href="#Quartz数据库核心表如下：" class="headerlink" title="Quartz数据库核心表如下："></a>Quartz数据库核心表如下：</h3><table>
<thead>
<tr>
<th>table</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>QRTZ_CALENDARS</td>
<td>存储Quartz的Calendar信息</td>
</tr>
<tr>
<td>QRTZ_CRON_TRIGGERS</td>
<td>存储CronTrigger，包括Cron表达式和时区信息</td>
</tr>
<tr>
<td>QRTZ_FIRED_TRIGGERS</td>
<td>存储与已触发的Trigger相关的状态信息，以及相联Job的执行信息</td>
</tr>
<tr>
<td>QRTZ_PAUSED_TRIGGER_GRPS</td>
<td>存储已暂停的Trigger组的信息</td>
</tr>
<tr>
<td>QRTZ_SCHEDULER_STATE</td>
<td>存储少量的有关Scheduler的状态信息，和别的Scheduler实例</td>
</tr>
<tr>
<td>QRTZ_LOCKS</td>
<td>存储程序的悲观锁的信息</td>
</tr>
<tr>
<td>QRTZ_JOB_DETAILS</td>
<td>存储每一个已配置的Job的详细信息</td>
</tr>
<tr>
<td>QRTZ_JOB_LISTENERS</td>
<td>存储有关已配置的JobListener的信息</td>
</tr>
<tr>
<td>QRTZ_SIMPLE_TRIGGERS</td>
<td>存储简单的Trigger，包括重复次数、间隔、以及已触的次数</td>
</tr>
<tr>
<td>QRTZ_BLOG_TRIGGERS</td>
<td>Trigger作为Blob类型存储</td>
</tr>
<tr>
<td>QRTZ_TRIGGER_LISTENERS</td>
<td>存储已配置的TriggerListener的信息</td>
</tr>
<tr>
<td>QRTZ_TRIGGERS</td>
<td>存储已配置的Trigger的信息</td>
</tr>
</tbody>
</table>
<h3 id="数据库脚本（mysql-innodb）："><a href="#数据库脚本（mysql-innodb）：" class="headerlink" title="数据库脚本（mysql_innodb）："></a>数据库脚本（mysql_innodb）：</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div><div class="line">162</div><div class="line">163</div><div class="line">164</div><div class="line">165</div><div class="line">166</div><div class="line">167</div><div class="line">168</div><div class="line">169</div><div class="line">170</div><div class="line">171</div><div class="line">172</div><div class="line">173</div><div class="line">174</div><div class="line">175</div><div class="line">176</div><div class="line">177</div><div class="line">178</div><div class="line">179</div></pre></td><td class="code"><pre><div class="line">#</div><div class="line"># In your Quartz properties file, you&apos;ll need to set </div><div class="line"># org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate</div><div class="line">#</div><div class="line">#</div><div class="line"># By: Ron Cordell - roncordell</div><div class="line">#  I didn&apos;t see this anywhere, so I thought I&apos;d post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.</div><div class="line"></div><div class="line">DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;</div><div class="line">DROP TABLE IF EXISTS QRTZ_LOCKS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_TRIGGERS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;</div><div class="line">DROP TABLE IF EXISTS QRTZ_CALENDARS;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_JOB_DETAILS(</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">JOB_NAME VARCHAR(200) NOT NULL,</div><div class="line">JOB_GROUP VARCHAR(200) NOT NULL,</div><div class="line">DESCRIPTION VARCHAR(250) NULL,</div><div class="line">JOB_CLASS_NAME VARCHAR(250) NOT NULL,</div><div class="line">IS_DURABLE VARCHAR(1) NOT NULL,</div><div class="line">IS_NONCONCURRENT VARCHAR(1) NOT NULL,</div><div class="line">IS_UPDATE_DATA VARCHAR(1) NOT NULL,</div><div class="line">REQUESTS_RECOVERY VARCHAR(1) NOT NULL,</div><div class="line">JOB_DATA BLOB NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_TRIGGERS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">TRIGGER_NAME VARCHAR(200) NOT NULL,</div><div class="line">TRIGGER_GROUP VARCHAR(200) NOT NULL,</div><div class="line">JOB_NAME VARCHAR(200) NOT NULL,</div><div class="line">JOB_GROUP VARCHAR(200) NOT NULL,</div><div class="line">DESCRIPTION VARCHAR(250) NULL,</div><div class="line">NEXT_FIRE_TIME BIGINT(13) NULL,</div><div class="line">PREV_FIRE_TIME BIGINT(13) NULL,</div><div class="line">PRIORITY INTEGER NULL,</div><div class="line">TRIGGER_STATE VARCHAR(16) NOT NULL,</div><div class="line">TRIGGER_TYPE VARCHAR(8) NOT NULL,</div><div class="line">START_TIME BIGINT(13) NOT NULL,</div><div class="line">END_TIME BIGINT(13) NULL,</div><div class="line">CALENDAR_NAME VARCHAR(200) NULL,</div><div class="line">MISFIRE_INSTR SMALLINT(2) NULL,</div><div class="line">JOB_DATA BLOB NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),</div><div class="line">FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)</div><div class="line">REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_SIMPLE_TRIGGERS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">TRIGGER_NAME VARCHAR(200) NOT NULL,</div><div class="line">TRIGGER_GROUP VARCHAR(200) NOT NULL,</div><div class="line">REPEAT_COUNT BIGINT(7) NOT NULL,</div><div class="line">REPEAT_INTERVAL BIGINT(12) NOT NULL,</div><div class="line">TIMES_TRIGGERED BIGINT(10) NOT NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),</div><div class="line">FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)</div><div class="line">REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_CRON_TRIGGERS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">TRIGGER_NAME VARCHAR(200) NOT NULL,</div><div class="line">TRIGGER_GROUP VARCHAR(200) NOT NULL,</div><div class="line">CRON_EXPRESSION VARCHAR(120) NOT NULL,</div><div class="line">TIME_ZONE_ID VARCHAR(80),</div><div class="line">PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),</div><div class="line">FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)</div><div class="line">REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_SIMPROP_TRIGGERS</div><div class="line">  (          </div><div class="line">    SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">    TRIGGER_NAME VARCHAR(200) NOT NULL,</div><div class="line">    TRIGGER_GROUP VARCHAR(200) NOT NULL,</div><div class="line">    STR_PROP_1 VARCHAR(512) NULL,</div><div class="line">    STR_PROP_2 VARCHAR(512) NULL,</div><div class="line">    STR_PROP_3 VARCHAR(512) NULL,</div><div class="line">    INT_PROP_1 INT NULL,</div><div class="line">    INT_PROP_2 INT NULL,</div><div class="line">    LONG_PROP_1 BIGINT NULL,</div><div class="line">    LONG_PROP_2 BIGINT NULL,</div><div class="line">    DEC_PROP_1 NUMERIC(13,4) NULL,</div><div class="line">    DEC_PROP_2 NUMERIC(13,4) NULL,</div><div class="line">    BOOL_PROP_1 VARCHAR(1) NULL,</div><div class="line">    BOOL_PROP_2 VARCHAR(1) NULL,</div><div class="line">    PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),</div><div class="line">    FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) </div><div class="line">    REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_BLOB_TRIGGERS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">TRIGGER_NAME VARCHAR(200) NOT NULL,</div><div class="line">TRIGGER_GROUP VARCHAR(200) NOT NULL,</div><div class="line">BLOB_DATA BLOB NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),</div><div class="line">INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),</div><div class="line">FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)</div><div class="line">REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_CALENDARS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">CALENDAR_NAME VARCHAR(200) NOT NULL,</div><div class="line">CALENDAR BLOB NOT NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,CALENDAR_NAME))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">TRIGGER_GROUP VARCHAR(200) NOT NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_FIRED_TRIGGERS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">ENTRY_ID VARCHAR(95) NOT NULL,</div><div class="line">TRIGGER_NAME VARCHAR(200) NOT NULL,</div><div class="line">TRIGGER_GROUP VARCHAR(200) NOT NULL,</div><div class="line">INSTANCE_NAME VARCHAR(200) NOT NULL,</div><div class="line">FIRED_TIME BIGINT(13) NOT NULL,</div><div class="line">SCHED_TIME BIGINT(13) NOT NULL,</div><div class="line">PRIORITY INTEGER NOT NULL,</div><div class="line">STATE VARCHAR(16) NOT NULL,</div><div class="line">JOB_NAME VARCHAR(200) NULL,</div><div class="line">JOB_GROUP VARCHAR(200) NULL,</div><div class="line">IS_NONCONCURRENT VARCHAR(1) NULL,</div><div class="line">REQUESTS_RECOVERY VARCHAR(1) NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,ENTRY_ID))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_SCHEDULER_STATE (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">INSTANCE_NAME VARCHAR(200) NOT NULL,</div><div class="line">LAST_CHECKIN_TIME BIGINT(13) NOT NULL,</div><div class="line">CHECKIN_INTERVAL BIGINT(13) NOT NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE TABLE QRTZ_LOCKS (</div><div class="line">SCHED_NAME VARCHAR(120) NOT NULL,</div><div class="line">LOCK_NAME VARCHAR(40) NOT NULL,</div><div class="line">PRIMARY KEY (SCHED_NAME,LOCK_NAME))</div><div class="line">ENGINE=InnoDB;</div><div class="line"></div><div class="line">CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);</div><div class="line">CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);</div><div class="line"></div><div class="line">CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);</div><div class="line">CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);</div><div class="line">CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);</div><div class="line">CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);</div><div class="line">CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);</div><div class="line">CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);</div><div class="line">CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);</div><div class="line">CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);</div><div class="line">CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);</div><div class="line">CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);</div><div class="line">CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);</div><div class="line">CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);</div><div class="line"></div><div class="line">CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);</div><div class="line">CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);</div><div class="line">CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);</div><div class="line">CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);</div><div class="line">CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);</div><div class="line">CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);</div><div class="line"></div><div class="line">commit;</div></pre></td></tr></table></figure>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/02/16/【日志处理】log4j配置学习总结/" rel="next" title="【日志处理】log4j配置学习总结">
                <i class="fa fa-chevron-left"></i> 【日志处理】log4j配置学习总结
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/02/21/quartz JobDataMap之NotSerializableException解决/" rel="prev" title="quartzJobDataMap之NotSerializableException解决">
                quartzJobDataMap之NotSerializableException解决 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
      <div id="lv-container" data-id="city" data-uid="MTAyMC8yNzgyMS80Mzk3"></div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/logo.png"
               alt="Gie" />
          <p class="site-author-name" itemprop="name">Gie</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
           
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">94</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
        </nav>

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/jieblog" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://git.oschina.net/log4j" target="_blank" title="GitOsc">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  GitOsc
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/u/3911368554" target="_blank" title="Weibo">
                  
                    <i class="fa fa-fw fa-weibo"></i>
                  
                  Weibo
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="wangiegieg@gmail.com" target="_blank" title="Email">
                  
                    <i class="fa fa-fw fa-google"></i>
                  
                  Email
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#Quartz数据库核心表如下："><span class="nav-number">1.</span> <span class="nav-text">Quartz数据库核心表如下：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#数据库脚本（mysql-innodb）："><span class="nav-number">2.</span> <span class="nav-text">数据库脚本（mysql_innodb）：</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Gie</span>
</div>



        

<div class="busuanzi-count">

  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  

  
    <span class="site-pv">本站总访问量<span class="busuanzi-value" id="busuanzi_value_site_pv"></span>次</span>
  

</div>



        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    
    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  





  
    <script type="text/javascript">
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  



  
  

  

  

  

  

  
  
  
  <link rel="stylesheet" href="/lib/algolia-instant-search/instantsearch.min.css">

  
  
  <script src="/lib/algolia-instant-search/instantsearch.min.js"></script>
  

  <script src="/js/src/algolia-search.js?v=5.1.0"></script>



  

</body>
</html>
